Motor control device and motor control method

ABSTRACT

This motor control device generates a voltage command value from a current command value and performs feedback control by means of a detected current flowing through a motor. The motor control device is provided with: a speed control unit that causes the motor to rotate at a set speed, and performs speed control of the motor on the basis of a speed command value that causes the flow of a d-axis current that is a set amount of current; a current measurement unit that measures a current command value that is on the basis of the output of the speed control unit when the motor is rotated at the set speed and the set amount of d-axis current is flowing; and a correction value calculation unit that calculates a correction value for the rotational position of the motor on the basis of the measured current command value.

TECHNICAL FIELD

The present invention relates to a motor control device and a motor control method.

Priority is claimed on Japanese Patent Application No. 2011-231882, filed Oct. 21, 2011, the content of which is incorporated herein by reference.

BACKGROUND ART

When a 3-phase brushless motor is controlled, the 3-phase brushless motor is not controlled on 3 phases of U, V, and W, but is generally controlled on 2 phases of d and q axes by performing coordinate conversion of the 3 phases of U, V, and W into biaxial coordinates of d and q axes.

Here, an overview of dq vector control by which the coordinate conversion into biaxial coordinates of the d and q axes is performed will be described. In the dq vector control, a motor control process is performed by an equivalent circuit on a dq coordinate system in which a field direction of a rotor is the d axis and the direction orthogonal to the field direction is the q axis. A motor control device controlling such a motor controls a d-axis command voltage Vd* and a q-axis command voltage Vq* through feedback control such that a detection current Id of the d axis and a detection current Iq of the q axis follow a d-axis command current Id* and a q-axis command current Iq* using, for example, proportional integral (PI) control.

As an angle detector detecting a rotation angle position of a rotor included in such a motor, an angle detector detecting a rotation angle by combining a resolver and an angle detection circuit is used. The resolver is a rotation detection device that detects a rotation angle of a rotor by a phase difference between a rotor coil and a stator coil. The resolver causes a magnetic field by applying a sinusoidal signal (E sin(ωt) (where E is an amplitude of a sinusoidal wave and ω is an excitation frequency)) to the rotor coil. In the magnetic field, a voltage (KE sin(ωt)×sin(θ), KE sin(ωt)×cos(θ)) has a phase difference between two stator coils orthogonal to each other is produced in the two stator coils. The resolver detects a rotation angle θ using outputs of the stator coils. Then, the motor control device controls a current of the motor based on the detected rotation angle θ.

However, in the motor in which such an angle detector is assembled, for example, an error due to manufacturing precision of a resolver between rotation positions of the angle detector and a synchronous motor or an error due to the assembly of the resolver may be caused.

For this reason, the motor control device disclosed in Patent Literature 1 rotates a motor from the outside by setting current command values of the d and q axes to 0. In this case, an induced voltage is generated in the motor, but the motor control device controls the motor such that the current becomes 0. Therefore, the motor control device controls the motor such that a d-axis current Id and a q-axis current Iq become 0. Therefore, when there is no deviation in a phase between the angle detector and the rotation position of the synchronous motor, only a q-axis voltage Vq is generated and a d-axis voltage Vd becomes 0.

However, when there is a deviation in the phase between the angle detector and the rotation position of the synchronous motor, the d-axis voltage Vd is generated. The motor control device disclosed in Patent Literature 1 obtains a d-axis command voltage Vd* and a q-axis command voltage Vq* so that the d-axis current Id and the q-axis current Iq become 0, and calculates an offset amount Δθ so that the obtained d-axis command voltage Vd* becomes 0. Further, the motor control device disclosed in Patent Literature 1 corrects the deviation occurring between the angle detector and the rotation position of the synchronous motor using the calculated offset amount.

Also, a motor control device disclosed in Patent Literature 2 rotates a motor by controlling a q-axis current Iq to 0 so that a d-axis current Id flows. In this case, the q-axis current Iq is a current by which torque is generated and the d-axis current Id is an excitation current. Therefore, in the case in which there is no deviation between the rotation positions of an angle detector and a synchronous motor, no torque is generated even when the q-axis current Id is set to 0 and the d-axis current Id flows. However, in the case in which there is the deviation between the angle detector and a rotation position of the synchronous motor, torque is generated when the q-axis current Iq is set to 0 and the d-axis current Id flows. For this reason, in the motor control device disclosed in Patent Literature 2, a deviation occurring due to an embedded-position aberration between the angle detector and a rotation position of the synchronous motor, a manufacture error, or the like is corrected by adjusting the torque so that the toque becomes 0 when the q-axis current Iq is controlled to 0 and the motor is rotated by flowing the d-axis current Id.

PRIOR ART LITERATURE Patent Literature [Patent Literature 1]

Japanese Patent No. 3789895

[Patent Literature 2]

Japanese Unexamined Patent Application, First Publication No. 2002-374692

DISCLOSURE OF INVENTION Problems to be Solved by the Invention

In the technology disclosed in Patent Literature 1, however, the coordinate conversion into the biaxial coordinates of the d and q axes is performed using a converter that converts a detection signal from 2 phases to 3 phases. On the other hand, in the technology disclosed in Patent Literature 1, delay occurs even in a pulse width modulation (PWM) converter driving a motor based on a generated command value. For this reason, the delay occurs between outputs of the angle detector and a PWM converter in some cases. As a result, in the technology disclosed in Patent Literature 1, there is the problem that the motor may not be controlled with high precision since the delay value has an influence of precision of offset adjustment. Also, in the technology disclosed in Patent Literature 1, an offset adjustment amount is calculated from a command voltage value. However, since a command voltage is easily affected by noise or a high-frequency wave, there is the problem that the motor may not be controlled with high precision.

Also, in the technology disclosed in Patent Literature 2, correction is performed using torque. Therefore, when there is friction in the motor and a load connected to the motor, the friction has an influence on the torque and an error occurs in a corrected value, and thus there is the problem that the motor may not be controlled with high precision.

The present invention is devised in view of the above-mentioned problems and an object of the present invention is to provide a motor control device and a motor control method capable of controlling a motor with high precision.

Means for Solving the Problems

In order to achieve the foregoing object, according to an aspect of the present invention, there is provided a motor control device generating a voltage command value from a current command value and performing feedback control using a detection current flowing in a motor. The motor control device includes: a velocity control unit configured to perform velocity control of the motor based on a velocity command value by which a constant current amount of d-axis current flows by rotating the motor at a constant velocity; a current measurement unit configured to measure the current command value based on an output of the velocity control unit when the motor is rotated at the constant velocity and the constant current amount of d-axis current flows; and a correction value calculation unit configured to calculate a correction value at a rotation position of the motor based on the measured current command value.

According to the aspect of the present invention, the correction value calculation unit may generate a value indicating the rotation position by adding the calculated correction value to a detection value corresponding to the rotation position of the motor. The velocity control unit may control the motor based on the generated value indicating the rotation position.

According to the aspect of the present invention, when the current measurement unit measures the current command value, the velocity control unit may perform the velocity control of the motor based on the velocity command value by which the constant current amount of d-axis current flows in the motor in a field-weakening control region.

According to the aspect of the present invention, when the current measurement unit measures the current command value, the velocity control unit may perform the velocity control of the motor based on a current command value obtained by adding the constant current amount of d-axis current to the current command value in a control region in which a velocity of the motor is not within a field-weakening region.

According to the aspect of the present invention, the current command value may include a d-axis current command value and a q-axis current command value. The current measurement unit may measure the d-axis current command value and the q-axis current command value when the motor is rotated based on the velocity command value. The correction value calculation unit may calculate a first correction value as the correction value based on phases of the measured d-axis current command value and the measured q-axis current command value when the motor is positively rotated.

According to the aspect of the present invention, the correction value calculation unit may calculate, as the correction value, a second correction value calculated based on a phase between the measured d-axis current command value and the measured q-axis current command value when the motor is negatively rotated.

According to the aspect of the present invention, the velocity control unit may perform the velocity control such that an absolute value of the velocity command value in the positive rotation of the motor is the same as an absolute value of the velocity command value in the negative rotation of the motor. The correction value calculation unit may calculate the correction value by calculating an average of the calculated first and second correction values.

According to the aspect of the present invention, the correction value calculation unit may calculate the correction value, the first correction value, and the second correction value using an equation below:

$\begin{matrix} {{{CORRECTION}\mspace{14mu} {VALUE}} = {- {\tan^{- 1}\left( \frac{\begin{matrix} {q\text{-}{AXIS}\mspace{14mu} {CURRENT}} \\ {{COMMAND}\mspace{14mu} {VALUE}} \end{matrix}}{\begin{matrix} {d\text{-}{AXIS}\mspace{14mu} {CURRENT}} \\ {{COMMAND}\mspace{14mu} {VALUE}} \end{matrix}} \right)}}} & \left\lbrack {{Math}.\mspace{14mu} 1} \right\rbrack \end{matrix}$

According to the aspect of the present invention, the current measurement unit may measure the q-axis current command value when the motor is rotated based on the velocity command value. The correction value calculation unit may repeatedly calculate the correction value by performing proportional integral control so that the measured q-axis current command value becomes 0 and add to the detection value corresponding to the rotation position of the motor based on the calculated correction value.

In order to achieve the foregoing object, according to an aspect of the present invention, there is provided a motor control method of a motor control device generating a voltage command value from a current command value and performing feedback control using a detection current flowing in a motor. The motor control method includes: a velocity control procedure of performing, by a velocity control unit, velocity control of the motor based on a velocity command value by which a constant current amount of d-axis current flows by rotating the motor at a constant velocity; a current measurement procedure of measuring, by a current measurement unit, the current command value based on an output of the velocity control unit when the motor is rotated at the constant velocity and the constant current amount of d-axis current flows; and a correction value calculation procedure of calculating, by a correction value calculation unit, a correction value at a rotation position of the motor based on the measured current command value.

Also, in the motor control method according to the aspect of the present invention, in the current measurement procedure, the q-axis current command value may be measured when the motor is rotated based on the velocity command value. In the correction value calculation procedure, the correction value may be repeatedly calculated by performing proportional integral control so that the measured q-axis current command value becomes 0 and the detection value corresponding to the rotation position of the motor is added based on the calculated correction value.

Effects of the Invention

According to the present invention, a current command value is measured when a constant current amount of d-axis current flows and a motor is rotated at a constant velocity, a correction value by a rotation position of the motor is calculated based on the measured current command value, and the rotation of the motor is controlled using the calculated correction value. As a result, even when the detected rotation position is deviated, the motor can be controlled with high precision.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a control block diagram illustrating a motor control device according to a first embodiment.

FIG. 2 is a diagram illustrating an overall constitution of a resolver according to the first embodiment.

FIG. 3 is a diagram for describing a field-weakening control region.

FIG. 4 is a control block diagram in a dq coordinate system and a control system d_(c)q_(c) coordinate system according to the first embodiment.

FIG. 5 is a vector diagram of a current and a voltage in the dq coordinate system.

FIG. 6 is a diagram for describing an example of a relation between voltage vectors in actual coordinates when an angular velocity is positive according to the first embodiment.

FIG. 7 is a diagram for describing an example of the relation between the voltage vectors when the angular velocity is positive according to the first embodiment.

FIG. 8 is a diagram for describing an example of the relation between the current vectors when the angular velocity is positive according to the first embodiment.

FIG. 9 is a diagram for describing an example of the relation between the voltage vectors when the angular velocity is negative according to the first embodiment.

FIG. 10 is a diagram for describing an example of the relation between the current vectors when the angular velocity is negative according to the first embodiment.

FIG. 11 is a diagram for describing a method of calculating an offset error correction value when a motor is rotated in the field-weakening control region according to the first embodiment.

FIG. 12 is a flowchart illustrating a calculation procedure of the offset error correction value according to the first embodiment.

FIG. 13 is a control block diagram in a dq coordinate system and a control system d_(c)q_(c) coordinate system according to a second embodiment.

FIG. 14A is a diagram for describing an example of a result obtained by calculating an offset error using an actual device according to the second embodiment.

FIG. 14B is a diagram for describing an example of a result obtained by calculating an offset error using an actual device according to the second embodiment.

FIG. 14C is a diagram for describing an example of a result obtained by calculating an offset error using an actual device according to the second embodiment.

FIG. 14D is a diagram for describing an example of a result obtained by calculating an offset error using an actual device according to the second embodiment.

FIG. 15 is a control block diagram illustrating a motor control device according to a third embodiment.

FIG. 16 is a flowchart illustrating an adjustment procedure of an offset error correction value according to the third embodiment.

PREFERRED EMBODIMENTS FOR CARRYING OUT THE INVENTION

Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Also, the present invention is not limited to related embodiments, but may be modified in various forms within the scope of the technical spirit and essence.

First, an overall operation of a motor control device will be described.

The motor control device is a device that is supplied with power from a battery cell and controls a motor, for example, in an industrial vehicle, an electric vehicle, a hybrid vehicle, an electric train, a ship, an airplane, and a power generation system.

In an electric vehicle using an electric motor as motive power or a hybrid vehicle (hereinafter referred to as “an electric vehicle or the like”) using an internal-combustion engine and an electric motor together as motive power, to improve power use efficiency, a motor control device uses pulse width modulation (PWM) control such that a pulse width is modulated when a 3-phase driving current is controlled.

In an electric vehicle or the like, a permanent magnet synchronous motor is mainly used and a 3-phase current synchronized with rotation flows in this motor. To perform PWM control on the 3-phase current, an electric pulse with a constant frequency which is called a carrier signal is used. In this case, a driving current is supplied as a rectangular wave with a modulated pulse width to the motor in accordance with a timing of the carrier signal and becomes a 3-phase current of a sinusoidal wave by an inductance of the motor.

In such a motor control device, a current flowing in the motor is controlled through proportional integral (PI) control using feedback so that the torque of an input torque command is obtained. Also, in the PI control, 3 phases of u, v, and w to be supplied to the motor are subjected to coordinate conversion to obtain biaxial coordinates of d and q axes and control is performed on 2 phases of the d and q axes. Also, in such a motor control device, a resolver which is an angle detection device detecting a rotation angle of the motor is assembled. Further, in the PI control of a current, the motor is controlled by generating a current command value based on a detected rotation angle of the motor and an input torque command and performing control such that the generated current command value is matched with a measured value of the current flowing in the motor.

The biaxial coordinates of the d and q axes (hereinafter referred to as a dq coordinate system) are a rotation coordinate system and are represented as a dq coordinate system that has a d axis in the direction of a magnetic flux produced by a permanent magnet forming a rotor and a q axis of which a phase is advanced 90 degrees from the d axis. Further, the dq coordinate system is rotated and a rotation velocity is an angular velocity ω. In the dq coordinate system, a d-axis component and a q-axis component of a voltage V of the motor are represented by Vd and Vq, respectively. Also, in the dq coordinate system, a d-axis component and a q-axis component of a current I of the motor are represented by Id and Iq, respectively.

Next, an overview of the present invention will be described.

In a motor control system, an error caused by assembling precision of a resolver, an error caused by manufacturing of the resolver, an error caused by processing delay of a detection signal by the resolver, or the like (hereinafter referred to as an error caused by the resolver) occurs. To correct such an error, in the motor control system according to the present invention, a motor in an unloaded state is rotated at a constant velocity by performing velocity control by a constant current command value.

Further, in the motor control system according to the present invention, when the motor is constantly rotated, a d-axis current flows by providing a constant d-axis current command value. When the motor is constantly rotated in the unloaded state, only a minute q-axis current flows in an actual operation. However, an error caused by the resolver occurs, and thus an angle deviation of the dq coordinate system occurs in coordinates in an actual operation and coordinates in the motor control device. Thus, when there is the angle deviation of the dq coordinate system in the actual operation and the motor control device, considerable q-axis currents apparently flow in the motor control device.

Based on such a principle, in the motor control system according to the present invention, current command values of the d and q axes are measured when the motor in the unloaded state is rotated at a constant velocity performing velocity control by a constant current command value. Further, in the motor control system according to the present invention, motor control is performed by calculating an offset error (correction value) from the measured current command values of the d and q axes and adding the calculated offset error correction value to a detection signal by the resolver.

First Embodiment

In a first embodiment, the motor is rotated in an unloaded state in a field-weakening control region (also referred to as a field-weakening region). When the motor is rotated at a high velocity in the field-weakening control region, an induced voltage increases, and therefore no current flows in the motor. The motor control device according to the present embodiment flows a constant current amount of a d-axis current by constantly rotating the motor at a high velocity in the field-weakening control region, measures a d-axis current command value and a q-axis current command value at that time, and calculates an offset error correction value. Hereinafter, the first embodiment will be described in detail.

FIG. 1 is a control block diagram illustrating the motor control device according to the present embodiment.

As illustrated in FIG. 1, a motor control system 1 according to the present embodiment includes a resolver 20, a motor control device 30, and an offset correction device 40.

The motor control device 30 includes a velocity calculation unit (velocity control unit) 302, a velocity proportional integral (PI) control unit (velocity control unit) 303, a current command unit (velocity control unit) 304, a current detector 305, a 3-phase/2-phase conversion unit 306, a current PI control unit 307, a 2-phase/3-phase conversion unit 308, a duty calculation unit 309, and a power conversion unit 310.

The offset correction device 40 includes a control unit 401, a current measurement unit 402, and an offset calculation unit (correction value calculation unit) 403.

Also, the motor control device 30 is connected to the motor 10 and the offset correction device 40.

The motor 10 is a 3-phase motor and is driven by a driving current output from the power conversion unit 310. The resolver 20 is assembled in the motor 10.

The resolver 20 is assembled in the motor 10. The resolver 20 detects a rotation angle of the motor 10 at each instant at each sampling time (hereinafter, a detected rotation angle is referred to as a detection angle) and outputs the detected detection angle to the velocity calculation unit 302, the 3-phase/2-phase conversion unit 306, and the 2-phase/3-phase conversion unit 308. Also, a sampling frequency is, for example, 5 [KHz].

The velocity calculation unit 302 calculates an angular velocity ω of the rotor of the motor 10 from a detection angle θ detected by the resolver 20 and outputs the calculated angular velocity ω to the velocity PI control unit 303, the current command unit 304, and the offset correction device 40.

The velocity PI control unit 303 controls a rotation velocity of the motor 10 such that the rotation velocity of the motor 10 becomes a velocity command value input from the outside. The velocity PI control unit 303 calculates a torque command value τ* by which the rotation velocity of the motor 10 becomes the velocity command value ω* based on a deflection between the velocity command ω* input from the outside and the angular velocity ω output by the velocity calculation unit 302, and outputs the calculated torque command value τ* to the current command unit 304. The torque command value τ* is used to command torque generated in the motor 10. Also, in the present specification, a command value or a command signal is represented by a variable to which “*” is attached on its upper right.

Also, the velocity PI control unit 303 calculates the torque command value τ* with regard to the motor 10 based on a current command value ω* output by the control unit 401 of the offset correction device 40 and outputs the calculated torque command value τ* to the current command unit 304.

The angular velocity ω output from the velocity calculation unit 302 and the torque command value τ* output by the velocity PI control unit 303 are input to the current command unit 304. The current command unit 304 generates a current command value Id* of the d axis and a current command value Iq* of the q axis (hereinafter referred to as a d-axis current command value and a q-axis current command value) which are 2-phase command currents having the d-axis component and the q-axis component, from the torque command value τ* and the angular velocity ω. The current command unit 304 outputs the generated d-axis current command value Id* and q-axis current command value Iq* to the current PI control unit 307.

The current detector 305 detects 3-phase currents Iu, Iv, and Iw for the motor 10 and outputs the detected currents Iu, Iv, and Iw of 3 phases to the 3-phase/2-phase conversion unit 306.

The 3-phase/2-phase conversion unit 306 converts the currents Iu, Iv, and Iw of the 3-phases output by the current detector 305 into a d-axis component Id and a q-axis component Iq (hereinafter referred to as detection currents) of 2 phases. The 3-phase/2-phase conversion unit 306 outputs the converted detection currents Id and Iq to the current PI control unit 307. Also, a current (d-axis current) of the d-axis component refers to a component (excitation current component) used to generate a magnetic flux in the motor 10 in a flowing current when the d axis is in the direction of the magnetic flux. Also, a current (q-axis current) of the q-axis component refers to a component corresponding to torque of a load among the flowing currents.

The d-axis current command value Id* and the q-axis current command value Iq* output by the current command unit 304 and the detection currents Id and Iq output by the 3-phase/2-phase conversion unit 306 are input to the current PI control unit 307. The current PI control unit 307 controls the current Iu, Iv, and Iw flowing in the motor 10 such that the detection currents Id and Iq which are control variables become values according to the d-axis current command value Id* and the q-axis current command value Iq*.

The current PI control unit 307 calculates deflections ΔId and ΔIq by subtracting the detection currents Id and Iq from the input d-axis current command value Id* and q-axis current command value Iq*, respectively. The current PI control unit 307 calculates a voltage command value Vd* of the d axis and a voltage command value Vq* of the q axis (hereinafter referred to as a d-axis voltage command value and a q-axis voltage command value) which are command voltages, using the calculated deflections ΔId and ΔIq by the following equations (1) and (2). Also, in the present embodiment, since the current PI control is performed, the d-axis voltage command value Vd* is the same as a voltage Vd and the q-axis voltage command value Vq* is the same as a voltage Vq. Therefore, in the present embodiment, the d-axis voltage command value Vd* and the q-axis voltage command value Vq* are represented as the d-axis voltage command value Vd and the q-axis voltage command value Vq, respectively.

The current PI control unit 307 outputs the calculated d-axis voltage command value Vd and q-axis voltage command value Vq to the 2-phase/3-phase conversion unit 308.

Vd*=Kp×ΔId+Ki×∫(ΔId)dt  (1)

Vq*=Kp×ΔIq+Ki×∫(ΔIq)dt  (2)

Also, in equations (1) and (2), coefficients Kp and Ki are coefficients set in advance.

The 2-phase/3-phase conversion unit 308 calculates voltage command values Vu*, Vv*, and Vw* of the 3-phases by performing coordinate conversions on the d-axis voltage command value Vd and the q-axis voltage command value Vq output by the current PI control unit 307 using the detection angle θ detected by the resolver 20. Since the current PI control is performed as in the current PI control unit 307 and the voltage command values Vu*, Vv*, and Vw* are the same as voltages Vu, Vv, and Vw, the voltage command values are represented as Vu, Vv, and Vw.

The 2-phase/3-phase conversion unit 308 outputs the calculated voltage command values Vu, Vv, and Vw of the 3 phases to the duty calculation unit 309.

The voltage command values Vu, Vv, and Vw of the 3 phases output by the 2-phase/3-phase conversion unit 308 are input to the duty calculation unit 309. The duty calculation unit 309 calculates duty signals Du, Dv, and Dw representing driving current signals to be provided to the motor from the voltage command values Vu, Vv, and Vw of the 3 phases at a timing determined by a carrier frequency fc. The duty calculation unit 309 outputs the calculated duty signals Du, Dv, and Dw to the power conversion unit 310.

The power conversion unit 310 includes, for example, a power control element (power element) such as an insulated gate bipolar transistor (IGBT) element that performs switching to generate driving currents from the duty signals Du, Dv, and Dw. The power conversion unit 310 generates the driving currents of the 3 phases corresponding to the duty signals Du, Dv, and Dw output by the duty calculation unit 309 and supplies the generated driving currents of the 3 phases to the motor 10.

The control unit 401 of the offset correction device 40 controls a clutch of a vehicle so that the motor 10 is rotated in an unloaded state, for example, when the motor control system 1 is mounted on the vehicle. The control unit 401 outputs, to the velocity PI control unit 303, a velocity command value ω* by which the motor 10 in the unloaded state is rotated in a field-weakening control region in which a magnetic field is decreased by rotating the motor 10 in a high-velocity region.

The current measurement unit 402 measures the d-axis current command value Id* and the q-axis current command value Iq* output by the current command unit 304. The current measurement unit 402 acquires the angular velocity ω output by the velocity calculation unit 302 and detects a rotation direction of the motor 10 based on the acquired angular velocity ω. The current measurement unit 402 outputs the measured d-axis current command value Id*, the measured q-axis current command value Iq*, and the detected rotation direction to the offset calculation unit 403.

The d-axis current command value Id*, the q-axis current command value Iq*, and the rotation direction output by the current measurement unit 402 are input to the offset calculation unit 403.

Also, the offset calculation unit 403 stores a winding resistance value Ra of each phase of the motor 10, an inductance component Ld of the d axis and an inductance component Lq of the q axis in each phase, and an interlinkage magnetic flux Φa of the motor 10 in advance.

The offset calculation unit 403 calculates an offset error correction value Δθ′ based on the stored values, and the rotation direction, the d-axis current command value Id*, and the q-axis current command value Iq* output by the current measurement unit 402, as will be described below.

Also, the calculated offset error correction value Δθ′ may be stored in a storage unit (not illustrated) of the motor control device 30 or the offset correction device 40.

FIG. 2 is a diagram illustrating an overall constitution of the resolver 20 according to the present embodiment.

As illustrated in FIG. 2, the resolver 20 is mounted on a through shaft of the motor 10 and is adjusted in accordance with a rotor magnetic field of the brushless motor. The resolver 20 includes a resolver rotor 22, a primary-side coil (rotor) 24, and two secondary-side coils (stator) 26 mutually separated from the primary-side coil 24 by 90 degrees. When an alternating current is applied to the primary side, a voltage is also generated in the secondary-side coils. The amplitude of a voltage output to the secondary side is sin θ and cos θ when θ is a rotor angle.

The resolver 20 calculates a detection angle of the motor 10 based on signals of the secondary-side coils 26. The calculated detection angle has a monotonically and substantially linearly increasing value since inertia is large in an electric vehicle or the like and acceleration is negligible compared to a sampling time between one-time rotation (360 degrees) and a rotation criterion angle (0 degrees) of an electric angle of the motor 10. Accordingly, calculated values during a plurality of rotations of the motor 10 form, for example, a toothed wave shape. The resolver 20 can detect the detection angle of the electric angle of the motor 10 by the calculated values.

FIG. 3 is a diagram for describing a field-weakening control region.

In FIG. 3, the horizontal axis represents a velocity and the vertical axis represents a voltage, a field, an output, and torque. Also, in FIG. 3, Nb is a base velocity and Nt is the maximum velocity. Further, the base velocity Nb refers to the maximum velocity in a voltage control region. Also, the maximum velocity Nt refers to the maximum velocity in the weakest field.

A curve g101 indicates a relation between a voltage and a velocity and a curve g102 indicates a relation between an output and a velocity. A curve g103 indicates a relation between a field and a velocity and a curve g104 indicates a relation between torque and a velocity.

As illustrated in FIG. 3, for example, voltage control is performed on the motor while constantly maintaining the field up to a predetermined rotation velocity (for example, the base velocity Nb), as in the curve g103. Thus, a region in which the voltage control is performed while constantly maintaining the field refers to a voltage control region. Also, in the voltage control region illustrated in FIG. 3, the d-axis current scarcely flows.

Further, in a region in which a velocity is equal to or greater than the predetermined rotation velocity, the rotation velocity is increased by weakening the field as in the curve g103 while constantly maintaining the voltage as in the curve g101. Such control refers to field-weakening control and such a region in which the voltage is constant and the rotation velocity becomes fast refers to a field-weakening control region (field control region.

FIG. 4 is a control block diagram in a dq coordinate system and a control system d_(c)q_(c) coordinate system according to the present embodiment.

The control system d_(c)q_(c) coordinate system refers to a coordinate system expressed by substituting the d and q axes in a motor control device 30 a with d_(c) and q_(c) axes, respectively.

As illustrated in FIG. 4, the motor control device 30 a includes a velocity calculation unit 302, a velocity PI control unit 303, a current command unit 304 a, and a current PI control unit 307 a. A control target 60 expressing the motor 10 and the resolver 20 in the d and q axes of the actual coordinates includes a first phase conversion unit 600, a second phase conversion unit 601, a motor voltage equation unit 602, a torque equation unit 603, a (1/Js) 604, a (1/s) 605, and an addition unit 70.

The offset correction device 40 a includes a control unit 401, a current measurement unit 402 a, and an offset calculation unit 403 a.

The same operation units as those in FIG. 1 are denoted by the same reference numerals and the description thereof will be omitted.

The angular velocity ω output from the velocity calculation unit 302 and the torque command value τ* output by the velocity PI control unit 303 are input to the current command unit 304 a of the motor control device 30 a. The current command unit 304 a generates a d_(c)-axis current command value Id_(c)* and a q_(c)-axis current command value Iq_(c)* from the torque command value τ* and the angular velocity ω. The current command unit 304 a outputs the generated d_(c)-axis current command value Id_(c)* and q_(c)-axis current command value Iq_(c)* to the current PI control unit 307 a.

The current PI control unit 307 a calculates a d_(c)-axis voltage command value Vd_(c) and a q_(c)-axis voltage command value Vq, from the input d-axis current command value Id_(c)* and q-axis current command value Iq_(c)* based on a d_(c)-axis current Id, and a q_(c)-axis current Iq_(c).

The first phase conversion unit 600 of the control target 60 is a conversion unit from a current of the d and q axes into a current of the d_(c) and q_(c) axes. The first phase conversion unit 600 is subjected to coordinate conversion by an actual offset error Δθ so that a d-axis current Id and a q-axis current Iq are converted into a d_(c)-axis current Id_(c) and a q_(c)-axis current Iq_(c), respectively. The first phase conversion unit 600 outputs the converted d_(c)-axis current Id, and q_(c)-axis current Iq_(c) to the current PI control unit 307 a.

Here, when a delay value |ω|Δt is omitted, the first phase conversion unit 600 is expressed as in the following equation (3).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 2} \right\rbrack & \; \\ {\begin{bmatrix} {idc} \\ {iqc} \end{bmatrix} = {\begin{bmatrix} {\cos \left( {\Delta \; \theta} \right)} & {\sin \left( {\Delta \; \theta} \right)} \\ {- {\sin \left( {\Delta \; \theta} \right)}} & {\cos \left( {\Delta \; \theta} \right)} \end{bmatrix}\begin{bmatrix} {Id} \\ {Iq} \end{bmatrix}}} & (3) \end{matrix}$

The second phase conversion unit 601 is a conversion unit from a voltage of the d_(c) and q_(c) axes to a voltage of the d and q axes. The second phase conversion unit 601 is subjected to coordinate conversion by an offset error Δθ so that a d_(c)-axis voltage Vd_(c) and a q_(c)-axis voltage Vq_(c) are converted into a d-axis voltage Vd and a q-axis voltage Vq, respectively. The second phase conversion unit 601 outputs the converted d-axis voltage Vd and q-axis voltage Vq to the motor voltage equation unit 602.

Here, when a delay value |ω|Δt is omitted, the second phase conversion unit 601 is expressed as an inverse matrix of equation (3) as in the following equation (4).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 3} \right\rbrack & \; \\ {\begin{bmatrix} {Vd} \\ {Vq} \end{bmatrix} = {\begin{bmatrix} {\cos \left( {\Delta \; \theta} \right)} & {- {\sin \left( {\Delta \; \theta} \right)}} \\ {\sin \left( {\Delta \; \theta} \right)} & {\cos \left( {\Delta \; \theta} \right)} \end{bmatrix}\begin{bmatrix} {Vdc} \\ {Vqc} \end{bmatrix}}} & (4) \end{matrix}$

The d-axis voltage Vd and the q-axis voltage Vq output by the second phase conversion unit 601 and angular velocities w calculated by the torque equation unit 603 and the (1/Js) 604 are input to the motor voltage equation unit 602.

A voltage equation of the motor 10 included in the motor voltage equation unit 602 is expressed as in the following equation (5) (for example, see Reference Document 1: Vector Control Technology of Permanent Magnet Synchronous Motor, First Volume, by Shinji Shinnaka p98 published in 2008 by Dempa Publications, Inc.).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 4} \right\rbrack & \; \\ {\begin{bmatrix} {Vd} \\ {Vq} \end{bmatrix} = {{\begin{bmatrix} {{Ra} + {pLd}} & {{- \omega}\; {Lq}} \\ {\omega \; {Ld}} & {{Ra} + {pLq}} \end{bmatrix}\begin{bmatrix} {Id} \\ {Iq} \end{bmatrix}} + \begin{bmatrix} 0 \\ {\omega \; \Phi \; a} \end{bmatrix}}} & (5) \end{matrix}$

In equation (5), ω is an angular velocity, Φa is an interlinkage magnetic flux of the motor 10, and ωΦa is an induced voltage. Ld is inductance of the d axis and Lq is inductance of the q axis. Ra is resistance per wiring one-phase of the motor 10.

Also, in equation (5), p is a differential operator. Therefore, in a steady state, equation (5) is expressed as in the following equation (6).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 5} \right\rbrack & \; \\ {\begin{bmatrix} {Vd} \\ {Vq} \end{bmatrix} = {{\begin{bmatrix} {Ra} & {{- \omega}\; {Lq}} \\ {\omega \; {Ld}} & {Ra} \end{bmatrix}\begin{bmatrix} {Id} \\ {Iq} \end{bmatrix}} + \begin{bmatrix} 0 \\ {\omega \; \Phi \; a} \end{bmatrix}}} & (6) \end{matrix}$

The motor voltage equation unit 602 calculates the d-axis current Id and the q-axis current Iq using equation (5) or (6) and outputs the calculated d-axis current Id and q-axis current Iq to the first phase conversion unit 600 and the torque equation unit 603.

The torque equation unit 603 calculates torque using a torque equation (see Reference Document 2: Generalized Analysis of Operating Limits of PM Motor and Suitable Machine Parameters for Constant Power Operation by Morimoto and Takeda published in IEEJ Transactions D Vol. 117, No. 6, pp. 751 to 757 (1997-6)) of the following equation (7) of the torque equation unit 603 and the d-axis current Id and the q-axis current Iq output by the motor voltage equation unit 602, and then outputs the calculated torque value to the (1/Js) 604. Also, the torque equation unit 603 stores the inductance component Ld of the d axis, the inductance component Lq of the q axis, and the interlinkage magnetic flux Φa.

[Math. 6]

TORQUE=Pn{Φa·Iq+(Ld−Lq)Id·Iq}  (7)

In equation (7), Pn is the number of pole pairs which is the number of pairs of magnetic poles of magnets of the motor 10 or the stator.

The (1/Js) 604 outputs the angular velocity ω from the torque calculated by the torque equation unit 603 and outputs the output angular velocity ω to the motor voltage equation unit 602 and the (1/s) 605. Also, J is inertia (a moment of inertia) of the motor 10 at an unloaded time.

The (1/s) 605 outputs an actual angle θ₀ from the angular velocity ω output by the (1/Js) 604 to the addition unit 70. The addition unit 70 adds the offset error Δθ to the actual angle θ₀ output by the (1/s) 605 and outputs the added detection signal θ to the velocity calculation unit 302 of the motor control device 30 a.

The current measurement unit 402 a of the offset correction device 40 a measures the d_(c)-axis current command value Id_(c)* and the q_(c)-axis current command value Iq_(c)* output by the current command unit 304 a. The current measurement unit 402 a acquires the angular velocity ω output by the velocity calculation unit 302 and detects a rotation direction of the motor 10 based on the acquired angular velocity ω. The current measurement unit 402 a outputs the measured d_(c)-axis current command value Id_(c)*, the measured q_(c)-axis current command value Iq_(c)*, and information indicating the detected rotation direction of the motor 10 to the offset calculation unit 403 a.

The d_(c)-axis current command value Id_(c)*, the q_(c)-axis current command value Iq_(c)*, and the information indicating the rotation direction of the motor 10 output by the current measurement unit 402 a are input to the offset calculation unit 403 a.

The offset calculation unit 403 a calculates an offset error correction value Δθ′ based on the stored values, the information indicating the rotation direction of the motor 10, the d_(c)-axis current command value Id_(c)*, and the q_(c)-axis current command value Iq_(c)* output by the current measurement unit 402 a.

Next, a vector relation between a current and a voltage in the dq coordinate system will be described.

A d-axis voltage and a q-axis voltage are expressed as the following equations (8) and (9) from equation (6).

Vd=RaId−ωLqIq  (8)

Vq=ωLdId+RaIq+ωΦa  (9)

FIG. 5 is a vector diagram of a current and a voltage in the dq coordinate system.

In FIG. 5, an angle δ is an internal phase angle (load angle) and is an angle formed by the q axis and a vector (hereinafter referred to as a voltage vector V) of the voltage V. In FIG. 5, a counterclockwise direction is the positive rotation direction and the q axis is advanced 90 degrees from the d axis.

As illustrated in FIG. 5, the voltage vector V applied to the motor 10 can be decomposed into a vector (hereinafter referred to as a vector Vd) of the d-axis voltage Vd (=−V sin δ) and a vector (hereinafter referred to as a vector Vq) of a q-axis voltage Vq (=V cos δ).

A current vector I flowing in the motor 10 can be decomposed into a vector (hereinafter referred to as a vector Id) of the d-axis current Id and a vector (hereinafter referred to as a vector Iq) of the q-axis current Iq.

The vector Vd (=−V sin δ) shown in equation (8) is expressed as a sum of a vector RaId and a vector (−ωLqIq), as illustrated in FIG. 5. Also, a vector Vq (=V cos δ) shown in equation (9) is expressed as a sum of a vector ωLdId, a vector RaIq, and a vector ωΦa.

When there is no error caused by assembly of the resolver 20, no error caused by manufacturing, no error occurring by delay of the motor control device 30 a, or the like, the d and q axes illustrated in FIG. 5 are identical to the d_(c) and q_(c) axes of the motor control device 30 a.

In FIG. 5, the relation between the vectors when there is no offset error in the resolver 20 and the d and q axes are identical to the d_(c) and q_(c) axes of the control system coordinates has been described.

Next, a relation between the vectors when there is an offset error in the resolver 20 and the d and q axes are not identical to the d_(c) and q_(c) axes of the control system coordinates will be described with reference to FIGS. 6 to 10.

FIG. 6 is a diagram for describing an example of the relation between voltage vectors in actual coordinates when an angular velocity is positive according to the present embodiment. FIG. 7 is a diagram for describing an example of the relation between the voltage vectors when the angular velocity is positive according to the present embodiment. FIG. 8 is a diagram for describing an example of the relation between the current vectors when the angular velocity is positive according to the present embodiment.

FIG. 9 is a diagram for describing an example of the relation between the voltage vectors when the angular velocity is negative according to the present embodiment. FIG. 10 is a diagram for describing an example of the relation between the current vectors when the angular velocity is negative according to the present embodiment.

In FIGS. 6 to 10, d-q coordinates indicate dq coordinates (hereinafter referred to as actual coordinates d-q) in which an actual field direction of the rotor is the d axis, and d_(c)-q_(c) coordinates indicate dq coordinates (which are hereinafter referred to as control system coordinates d_(c)-q_(c) and the d and q axes in the control system coordinates d_(c)-q_(c) are referred to as d_(c) and q_(c) axes) determined by a magnetic pole position (hereinafter referred to as a resolver detection position) detected by the resolver 20. Also, control system coordinates d_(c)-q_(c) when the angular velocity ω is positive (positive rotation) are shown as control system coordinates d_(c1)-q_(c1) and control system coordinates d_(c)-q_(c) when the angular velocity ω is negative (negative rotation) are shown as control system coordinates d_(c2)-q_(c2).

First, a case in which the angular velocity ω is positive, that is, the motor 10 is positively rotated, will be described with reference to FIGS. 6 to 8.

A state illustrated in FIGS. 6 to 8 is a state in which the motor 10 is rotated by the motor control device 30 a in FIG. 4 in the field-weakening control region so that an angular velocity of the motor 10 in the unloaded state is positive.

As illustrated in FIG. 6, when the motor 10 in the unloaded state is positively rotated fast in the field-weakening control region in the actual coordinates d-q, an induced-voltage vector ωΦa is generated in the positive direction of the q axis. Also, in regard to the voltage components by the d-axis current Id and the q-axis current Iq, a voltage vector (ωLdId+RaIq) is generated in the negative direction of the q axis so that the induced-voltage vector ωΦa is suppressed since a negative d-axis current Id* is generated as a command by the field-weakening control. Therefore, the q-axis voltage vector Vq is a resultant vector of the voltage vector (ωLdId+RaIq) and the induced-voltage vector ωΦa. Also, a d-axis voltage vector Vd (=−ωLqIq+RaId) is generated in the negative direction of the d axis. Also, in FIG. 6, a voltage vector V1 is a voltage of the motor 10.

As illustrated in FIG. 6, when the motor 10 in the unloaded state is rotated in the positive-direction at the angular velocity in the field-weakening control region, only a minute d-axis voltage is generated in the actual coordinates d-q.

On the other hand, in the example illustrated in FIG. 7, the description will be made on the assumption that the actual coordinates d-q and the control system coordinates d_(c1)-q_(c1) advance by a delay value |ω|Δt in addition to the offset error Δθ.

As illustrated in FIG. 7, components of a (V1-ωΦa) vector are different between the actual coordinates d-q and the control system coordinates d_(c1)-q_(c1). Here, −ωLqIq+RaId of the d-axis component in the actual coordinates d-q becomes −ωLqIq_(c1)+RaId_(c1) of the d_(c1)-axis component in the control system coordinates d_(c1)-q_(c1), and ωLdId+RaIq of the q-axis component in the actual coordinates d-q becomes ωLdId_(c1)+RaIq_(c1) of the d_(c1)-axis component in the control system coordinates d_(c1)-q_(c1).

FIG. 8 illustrates a current vector when a wiring resistance value Ra of each phase is sufficiently smaller than ωLd and ωLq in the voltage vector (V1-ωΦa) in the control system coordinates d_(c1)-q_(c1) in FIG. 7 and the inductance Ld of the d axis is almost the same as the inductance Lq of the q axis.

As illustrated in FIG. 8, in the control system coordinates d_(c1)-q_(c1), the current vector I1 delayed by an angle α with respect to the d axis of the actual coordinates flows. The angle α is a delay by a q-axis current corresponding to minute torque such as friction of an unloaded operation. The current vector I1 can be decomposed into a current vector Id_(c1) in the positive direction of the d_(c1) axis and a current vector Id_(c1) in the negative direction of the d_(c1) axis.

Also, as illustrated in FIG. 8, an angle formed by the current vector I1 and the current vector Id_(c1) is a sum of (the offset error Δθ+the delay value |ω|Δt) and (the angle α formed by the d axis of the actual coordinates d-q and the current vector I1).

Next, a case in which the angular velocity ω is negative, that is, the motor 10 is negatively rotated (reversely rotated), will be described with reference to FIGS. 9 and 10.

A state illustrated in FIGS. 9 and 10 is a state in which the motor 10 is rotated by the motor control device 30 a in FIG. 4 in the field-weakening control region so that an angular velocity of the motor 10 in the unloaded state is negative.

As illustrated in FIG. 9, when the motor 10 in the unloaded state is negatively rotated fast in the field-weakening control region in the actual coordinates d-q, the induced-voltage vector ωΦa is generated in the negative direction of the q axis. Also, in regard to the voltage components by the d-axis current Id and the q-axis current Iq, a voltage vector (ωLdId+RaIq) is generated in the positive direction of the q axis so that the induced-voltage vector ωΦa is suppressed since a negative d-axis current Id* is generated as a command by the field-weakening control. Therefore, the q-axis voltage vector Vq is a resultant vector of the voltage vector (ωLdId+RaIq) and the induced-voltage vector ωΦa. Also, a d-axis voltage vector Vd (=−ωLqIq+RaId) is generated in the negative direction of the d axis. Also, in FIG. 9, a voltage vector V2 is a voltage of the motor 10.

As illustrated in FIG. 9, when the motor 10 in the unloaded state is negatively rotated in the field-weakening control region, only a minute d-axis voltage is generated in the actual coordinates d-q as in the time of the positive rotation of the motor 10.

Next, a voltage vector of the control system coordinates d_(c2)-q_(c2) will be described. The description will be made on the assumption that the actual coordinates d-q and the control system coordinates d_(c2)-q_(c2) advance by an amount obtained by subtracting a delay value |ω|Δt from the offset error Δθ.

Components of a (V2-ωΦa) vector are different between the actual coordinates d-q and the control system coordinates d_(c2)-q_(c1). Here, −ωLqIq+RaId of the d-axis component in the actual coordinates d-q becomes −ωLqIq_(c2)+RaId_(c2) of the d_(c2)-axis component in the control system coordinates d_(c2)-q_(c2). Also, ωLdId+RaIq of the q-axis component in the actual coordinates d-q becomes ωLdId_(c2)+RaIq_(c2) of the d_(c2)-axis component in the control system coordinates d_(c2)-q_(c2).

FIG. 10 illustrates a current vector when a wiring resistance value Ra of each phase is sufficiently smaller than ωLd and ωLq in the voltage vector (V2-ωΦa) in the control system coordinates d_(c1)-q_(c2) in FIG. 9 and the inductance Ld of the d axis is almost the same as the inductance Lq of the q axis.

As illustrated in FIG. 10, in the control system coordinates d_(c2)-q_(c2), the current vector I2 advancing by an angle α with respect to the d axis of the actual coordinates flows. The current vector I2 can be decomposed into a current vector Id_(c2) in the positive direction of the d_(c2) axis and a current vector Id_(c2) in the negative direction of the d_(c1) axis. Also, as illustrated in FIG. 10, an angle formed by the current vector I2 and the current vector Id_(c2) is a difference between (the offset error Δθ−the delay value |ω|Δt) and (the angle α formed by the d axis of the actual coordinates d-q and the current vector I2).

Next, a method of calculating the offset error correction value Δθ′ from the current vectors at the time of the positive rotation and the negative rotation of the motor 10 illustrated in FIGS. 8 and 10 will be described with reference to FIG. 11.

FIG. 11 is a diagram for describing a method of calculating an offset error correction value when the motor is rotated in the field-weakening control region according to the present embodiment.

As illustrated in FIG. 11, when the motor 10 is positively rotated (ω>0), an angle formed by the d_(c1)-axis current vector Id_(c1) and the q_(c1)-axis current vector Iq_(c1) is the sum of (the offset error Δθ+the delay value |ω|Δt) and (the angle α formed by the d axis of the actual coordinates d-q and the current vector I1), as described with reference to FIG. 8. Therefore, a relation among this formed angle, the d_(c1)-axis current vector Id_(c1) and the q_(c1)-axis current vector Iq_(c1) is expressed as in the following equations (10) and (11).

tan(Δθ+|ω|Δt+Δ)=Iq _(c1)/(−Id _(c1))  (10)

Δθ+|ω|Δt+Δ)=tan⁻¹(Iq _(c1)/(−Id _(c1)))  (11)

On the other hand, as illustrated in FIG. 11, when the motor 10 is negatively rotated (a)<0), an angle formed by the d_(c2)-axis current vector Id_(c2) and the q_(c2)-axis current vector Iq_(c2) is the difference between (the offset error Δθ−the delay value |ω|Δt) and (the angle α formed by the d axis of the actual coordinates d-q and the current vector I2), as described with reference to FIG. 10. Therefore, a relation among this formed angle, the d_(c2)-axis current vector Id_(c2) and the q_(c2)-axis current vector Iq_(c2) is expressed as in the following equations (12) and (13).

tan(Δθ−|ω|Δt−α)=Iq _(c2)/(−Id _(c2))  (12)

Δθ−|ω|Δt−α)=tan⁻¹(Iq _(c2)/(−Id _(c2)))  (13)

From equations (11) and (13), the correction value Δθ′ of the offset error Δθ can be calculated by the following equation (14).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 7} \right\rbrack & \; \\ {{\Delta \; \theta^{\prime}} = {{- \frac{1}{2}}{\left\{ {{\tan^{- 1}\left( \frac{{Iq}_{c\; 1}}{{Id}_{c\; 1}} \right)} + {\tan^{- 1}\left( \frac{{Iq}_{c\; 2}}{{Id}_{c\; 2}} \right)}} \right\}.}}} & (14) \end{matrix}$

Equation (14) expresses that the offset error correction value Δθ′ is calculated when a current command value is measured at the time of the positive rotation of the motor 10 and a current command is measured at the time of the negative rotation thereof.

That is, the offset calculation unit 403 a measures the d_(c1)-axis current command value Id_(c1) and the q_(c1)-axis current command value N_(c1) when the motor 10 in the unloaded state is positively rotated. Next, the offset calculation unit 403 a measures the d_(c2)-axis current command value Id_(c2) and the q_(c2)-axis current command value Iq_(c2) when the motor 10 in the unloaded state is negatively rotated. Next, the offset calculation unit 403 a calculates the offset error correction value Δθ′ by substituting the measured current command values into equation (14).

Also, in the present embodiment, for example, the absolute values of the velocity command values in the positive rotation and the negative rotation of the motor 10 are set to be the same using equation (14) to remove the influences of the delay value |ω|Δt and the angle α, and the voltage command values are measured.

Also, in equation (14), the case in which the wiring resistance value Ra of each phase is sufficiently smaller than ωLd and ωLq and the inductance Ld of the d axis is almost the same as the inductance Lq of the q axis has been described. However, when the resistance value Ra, the inductance Ld of the d axis, and the inductance Lq of the q axis are considered, the offset error correction value Δθ′ is expressed as in the following equation (15).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 8} \right\rbrack & \; \\ {{\Delta \; \theta^{\prime}} = {{- \frac{1}{2}}\begin{Bmatrix} {{\tan^{- 1}\left( \frac{{\omega \cdot {Lq} \cdot {Iq}_{c\; 1}} - {{Ra} \cdot {Id}_{c\; 1}}}{{\omega \cdot {Ld} \cdot {Id}_{c\; 1}} + {{Ra} \cdot {Iq}_{c\; 1}}} \right)} +} \\ {\tan^{- 1}\left( \frac{{\omega \cdot {Lq} \cdot {Iq}_{c\; 2}} - {{Ra} \cdot {Id}_{c\; 2}}}{{\omega \cdot {Ld} \cdot {Id}_{c\; 2}} + {{Ra} \cdot {Iq}_{c\; 2}}} \right)} \end{Bmatrix}}} & (15) \end{matrix}$

Next, a calculation procedure of the offset error correction value Δθ′ will be described with reference to FIGS. 4, 8, 10, and 12.

Also, the following calculation of the offset error correction value Δθ′ may be performed when the motor control system 1 is mounted on a vehicle, e.g., when a vehicle is assembled, a vehicle is inspected, or the motor 10 or the motor control device 30 is exchanged.

FIG. 12 is a flowchart illustrating the calculation procedure of the offset error correction value according to the present embodiment.

(Step S1) The control unit 401 generates a velocity command value so that the d-axis current Id flows in the field-weakening control region by positively rotating the motor 10, and outputs the generated velocity command value to the motor control device 30 a. After step S1 ends, the process proceeds to step S2.

(Step S2) The current measurement unit 402 a measures the d_(c2)-axis current command value Id_(c1) and the q_(c1)-axis current command value Iq_(c1) and outputs the measured d_(c1)-axis current command value Id_(c1) and q_(c1)-axis current command value Iq_(c1) to the offset calculation unit 403 a.

Next, the current measurement unit 402 a acquires the angular velocity ω output by the velocity calculation unit 302 and detects the rotation direction based on the acquired angular velocity ω. In step S2, the current measurement unit 402 a detects the positive direction (positive rotation) as the rotation direction. Next, the current measurement unit 402 a outputs the detected rotation direction to the offset calculation unit 403 a. When step S2 ends, the process proceeds to step S3.

(Step S3) The control unit 401 generates a velocity command value so that the d-axis current Id flows in the field-weakening control region by negatively rotating the motor 10, and outputs the generated velocity command value to the motor control device 30 a. After step S3 ends, the process proceeds to step S4.

(Step S4) The current measurement unit 402 a measures the d_(c2)-axis current command value Id_(c2), and the (1,2-axis current command value Iq_(c2) and outputs the measured d_(c2)-axis current command value Id_(c2) and q_(c2)-axis current command value Iq_(c2) to the offset calculation unit 403 a.

Next, the current measurement unit 402 a acquires the angular velocity ω output by the velocity calculation unit 302 and detects the rotation direction based on the acquired angular velocity ω. In step S4, the current measurement unit 402 a detects the negative direction (negative rotation) as the rotation direction. Next, the current measurement unit 402 a outputs the detected rotation direction to the offset calculation unit 403 a. After step S4 ends, the process proceeds to step S5.

(Step S5) The offset calculation unit 403 a calculates the offset error correction value Δθ′ using equation (14) or (15) based on the measured current command values and the detected rotation direction.

The above-described offset error correction value calculation process thus ends.

Also, in equations (14) and (15), the example in which the magnitudes of the d-axis voltage and the q-axis voltage are different between the time of the positive rotation of the motor 10 and the time of the negative rotation thereof has been described, but the present invention is not limited thereto. The q-axis current Iq=0 can be considered in the actual coordinates d-q. Further, when signal delay from the detection signal by the resolver 20 to the power conversion unit 310 is sufficiently corrected, α=0 and |ω|Δt=0 can be considered. Therefore, for example, the offset calculation unit 403 a may measure only the d_(c1)-axis current command value Id_(c1) and the q_(c1)-axis current command value Iq_(c), at the time of the positive rotation of the motor 10 and may calculate the offset error correction value Δθ′ (first correction value) by the following equation (16).

$\begin{matrix} \left\lbrack {{Math}.\mspace{14mu} 9} \right\rbrack & \; \\ {{\Delta \; \theta^{\prime}} = {- {\tan^{- 1}\left( \frac{{Iq}_{c\; 1}}{{Id}_{c\; 1}} \right)}}} & (16) \end{matrix}$

Alternatively, the offset calculation unit 403 a may measure only the d_(c2)-axis current command value Id_(c2) and the q_(c2)-axis current command value Iq_(c2) at the time of the negative rotation of the motor 10 and may calculate the offset error correction value Δθ′ (second correction value).

As described above, the offset calculation unit 403 a is configured to flow the d-axis current by positively and negatively rotating the motor 10 in the unloaded state fast at a constant velocity in the field-weakening control region. Then, the offset calculation unit 403 a measures the current command values at the time of the fast rotation. Then, the offset calculation unit 403 a is configured to calculate the offset error correction value by averaging −tan⁻¹(Iq/Id) of the measured current command values in the rotation directions using equation (14) or (15) and cancelling the influence of |ω|Δt or torque such as friction of the motor in the unloaded state, which is a delay element, from the angle formed by the current vectors including an offset error.

As a result, in the motor control system 1 according to the present embodiment, since the motor 10 in the unloaded state is rotated in the positive direction and the reverse direction, an offset error can be corrected with higher precision compared to the technologies of the related art in which a motor is rotated only in the positive direction. In the motor control system 1 according to the present embodiment, the rotation of the motor 10 is controlled by the velocity command value of the offset correction device 40. Therefore, for example, also when the motor 10 is driven only by electricity as opposed to that of a hybrid car using gasoline and electricity, a current command value can be measured by positively and negatively rotating the motor 10 and an offset control value can be calculated.

In technologies of the related art, since an offset error correction value is calculated from a voltage command value, the influence of high-frequency noise occurring due to PWM driving or the like of the power conversion unit 310 on a voltage is considerable. On the other hand, in the motor control system 1 according to the present embodiment, since the current command value is used to calculate the offset error correction value, the influence of the high-frequency noise is scarcely received. Therefore, the offset error can be controlled with high precision.

Second Embodiment

In a second embodiment, when a motor is rotated at a low velocity in a control region in which no d-axis current is generated and which is not within a field-weakening control region, e.g., a voltage control region (FIG. 3) in which a field is constantly controlled, a d-axis current is allowed to flow by adding a d-axis current command value.

Hereinafter, the second embodiment will be described in detail.

FIG. 13 is a control block diagram in a dq coordinate system and a control system d_(c)q_(c) coordinate system according to the present embodiment.

As illustrated in FIG. 13, a motor control device 30 b includes a velocity calculation unit 302, a velocity PI control unit 303, a current command unit 304 a, a current PI control unit 307 b, and an addition unit 331. A control target 60 includes a first phase conversion unit 600, a second phase conversion unit 601, a motor voltage equation unit 602, a torque equation unit 603, a (1/Js) 604, and a (1/s) 605.

An offset correction device 40 b includes a control unit 401 b, a current measurement unit 402 a, an offset calculation unit 403 a, and an addition unit 70.

The same operation units as those in FIGS. 1 and 3 are denoted by the same reference numerals and the description thereof will be omitted.

The addition unit 331 of the motor control device 30 b adds an addition current command value Id_(c)*′ to the d_(c) axis, which is output by the control unit 401 b of the offset correction device 40 b and a current command value Id_(c)*″ before addition to the d_(c) axis, which is output by the current command unit 304 a, and then outputs an added current command value Id_(c)* to the current PI control unit 307 b.

The control unit 401 b of the offset correction device 40 b generates a velocity command value so that the motor 10 is rotated at a constant velocity by the number of rotations by which no d-axis current flows, and then outputs the generated velocity command value to the velocity PI control unit 303. Also, when the motor 10 is rotated in a low-velocity region, the control unit 401 b generates an addition current command value Id_(c)*′ to the d axis so that a d-axis current flows, and then outputs the generated current command value Id_(c)*′ to the addition unit 331.

In the second embodiment, the offset correction device 40 b performs control such that the motor 10 is rotated by the number of rotations of a range in which no d-axis current flows. In this case, no d-axis current Id flows in the motor 10.

Next, the control unit 401 b outputs a constant addition current command value Id_(c)*′ to the d axis to the addition unit 331 to forcibly flow a d-axis current. When the number of rotations of the motor 10 is low, there is scarcely an influence on torque in spite of the fact that the addition current to the d axis is allowed to flow in this way.

When the motor 10 is rotated at a low velocity at which no d-axis current flows, an offset error correction value can be calculated using equations (14) and (15) by forcibly flowing a d-axis current by an addition current command value d_(c)*′ and measuring current command values Id_(c1)* and Id_(c2)* of the d_(c) axis, a q_(c)-axis current command value Iq_(c1)*, and a current command value Iq_(c2)* at the time of the positive rotation and the negative rotation of the motor 10, as in the first embodiment. Also, the absolute values of the magnitudes of the velocity command values in the positive rotation and the negative rotation are preferably the same.

Next, actual measurement results will be described with reference to FIGS. 14A to 14D.

FIGS. 14A to 14D are diagrams for describing examples of results obtained by calculating an offset error using an actual device according to the second embodiment.

<<Actual Measurement Method>>

Procedure 1: Internal data of the motor control device 30 b is measured when the motor in an unloaded state is rotated by a velocity command value of +1000 [rpm] and the d-axis current is added.

Procedure 2: Internal data of the motor control device 30 b is measured when the motor in an unloaded state is rotated by a velocity command value of −1000 [rpm] and the d-axis current is added.

Procedure 3: An offset error correction value is calculated from the d-axis current command values and the q-axis current command values measured in Procedures 1 and 2.

Procedure 4: +30 [deg] is added to an offset error and measurement is performed in Procedures 1 to 3.

Procedure 5: −30 [deg] is added to an offset error and measurement is performed in Procedures 1 to 3.

FIGS. 14A and 14B show actual measurement results of Procedures 1 to 3. That is, the results obtained by measuring effects of the present embodiment with respect to the offset error of an actual device are shown. As the measurement result, the offset error of the actual device is +1.7 [deg].

FIGS. 14C and 14D show actual measurement results of Procedure 4. That is, the results obtained by measuring effects are shown when an offset error of +30 [deg] is added in addition to the offset error of the actual device.

In FIGS. 14A and 14C, the first row indicates measurement items. The second row indicates actually measured values of the internal data of the motor control device 30 b when the number of rotations is +1000 [rpm]. The third row indicates actually measured values of the internal data of the motor control device 30 b when the number of rotations is −1000 [rpm].

In FIGS. 14B and 14D, the first row indicates an item. The second row indicates a calculated value of the offset error correction value when the number of rotations is +1000 [rpm]. The third row indicates a calculated value of the offset error correction value of the motor control device 30 b when the number of rotations is −1000 [rpm]. Also, the calculated values in FIGS. 14A and 14C are values calculated by substituting the measured values illustrated in FIGS. 14A and 14C into −tan⁻¹(Iq*/Id*).

As illustrated in FIG. 14B, when the actual device has an offset error of 1.7 [deg], the offset error correction value only in the positive rotation is +5.2 [deg] and the offset error correction value only in the negative rotation is −2.1 [deg]. Next, as described in equation (14), a calculated average of the offset error correction values of the positive rotation and the negative rotation is +1.5 [deg], as in FIG. 14B. That is, even when a sum of the offset errors of the actual device is +1.7 [deg], correction precision of (the offset error−the offset error correction value) can be suppressed to +0.2 [deg] according to the present embodiment.

As illustrated in FIG. 14D, when an offset error of +30 [deg] is added to 1.7 [deg], the offset error correction value only in the positive rotation is +34.5 [deg] and the offset error correction value only in the negative rotation is +28.1 [deg]. Next, a calculated average of the offset error correction values of the positive rotation and the negative rotation is +31.3 [deg], as in FIG. 14D. That is, even when a sum of the offset errors of the actual device is +31.7 (=1.7+30) [deg], correction precision of (the offset error−the offset error correction value) can be suppressed to +0.4 [deg] according to the present embodiment.

Likewise, when an offset error of −30 [deg] is added in addition to the offset error of the actual device (Procedure 5), the offset error correction value only in the positive rotation is −24.9 [deg], the offset error correction value only in the negative rotation is −31.4 [deg], and an average is −28.1 [deg]. That is, even when a sum of the offset errors of the actual device is −28.3 (=1.7-30) [deg], correction precision of (the offset error−the offset error correction value) can be suppressed to +0.4 [deg] according to the present embodiment.

The reason for suppressing the correction precision of the offset error compared to the case of only the positive rotation or only the negative rotation is that an influence caused by a delay element of the motor control device 30 b, friction torque of the motor in the unloaded state, or the like is cancelled by calculating the average of the offset error correction values of the positive rotation and the negative rotation. Thus, according to the present embodiment, the correction precision of the offset error can be suppressed with high precision.

As described above, in the second embodiment, the motor 10 is rotated at a low velocity in the region in which no d-axis current flows, a d-axis current flows at this time by the addition current command value d_(c)*′, and the offset error correction value is calculated by measuring the d_(c)-axis current command value Id_(c) and the q_(c)-axis current command value Iq_(c). Therefore, as in the first embodiment, the offset error correction value can be obtained without rotating the motor 10 at a high velocity. As a result, power saving and noise reduction can be realized during a calculation period of the offset error correction value, compared to the first embodiment.

Third Embodiment

Next, an automatic adjustment example of a calculated offset error correction value in a third embodiment will be described.

First, an overview of the present embodiment will be described.

When a motor in an unloaded state is rotated and an assembly error of a resolver, a delay element of signal processing by a motor control device, or external torque such as friction is negligible, no q-axis current Iq flows, and thus a d-axis current command value Iq* is 0. However, when there is an assembly error of the resolver or a delay element of the signal processing by the motor control device, a q-axis current flows, and thus the q-axis current command value Iq* is not 0.

Therefore, in the present embodiment, a q-axis current command value is measured at the time of rotation of the motor in an unloaded state and a correction value generated by performing PI control so that the measured q-axis current command value becomes 0 is fed back to the motor control device. Then, the motor control device performs motor control by correcting the generated correction value to a rotation angle θ detected by the resolver.

FIG. 15 is a control block diagram illustrating a motor control device 1 c according to the present embodiment. The same operation units as those in FIG. 1 are denoted by the same reference numerals and the description thereof will be omitted.

A difference between the first and second embodiments is an offset correction device 40 c. The offset correction device 40 c includes a control unit 411, a current measurement unit 412, a PI control unit 413, and an addition unit 414.

The control unit 411 generates a velocity command value by which a d-axis current flows in a field-weakening control region and outputs the generated velocity command value to the motor control device 30 c. Also, the control unit 411 performs control such that the motor 10 is rotated in an unloaded state.

When the motor 10 in the unloaded state is rotated in the field-weakening control region, the current measurement unit 412 measures a q-axis current command value Iq* and outputs the measured q-axis current command value Iq* to the PI control unit 413.

The PI control unit 413 generates an offset error correction value Δθ′ which is a correction value by performing proportional integral control on a deflection between 0 and the q-axis current command value Iq* output by the current measurement unit 412, and then outputs the generated offset error correction value Δθ′ to the addition unit 414.

The addition unit 414 corrects the offset error correction value Δθ′ output by the PI control unit 413 in a detection signal θ output by the resolver 20 and outputs the corrected signal as an angle measurement signal θ to the velocity calculation unit 302, the 3-phase/2-phase conversion unit 306, and the 2-phase/3-phase conversion unit 308.

Next, an adjustment procedure will be described with reference to FIG. 16.

FIG. 16 is a flowchart illustrating the adjustment procedure of an offset error correction value according to the present embodiment.

<<Adjustment Procedure>>

(Step S101) The control unit 411 generates the velocity command value by which the d-axis current flows in the field-weakening control region and outputs the generated velocity command value to the motor control device 30 c. After step S101 ends, the process proceeds to step S102.

(Step S102) When the motor 10 in the unloaded state is rotated, the current measurement unit 412 measures the q-axis current command value Iq* and outputs the measured q-axis current command value Iq* to the PI control unit 413. After step S102 ends, the process proceeds to step S103.

(Step S103) The PI control unit 413 generates the offset error correction value Δθ′ which is a correction value by performing the proportional integral control in the deflection between 0 and the q-axis current command value Iq* output by the current measurement unit 412, and then outputs the angle measurement signal θ′ obtained by correcting the generated offset error correction value Δθ′ in the rotation angle θ detected by the resolver 20 to the motor control device 30 c. After step S103 ends, the process proceeds to step S104.

(Step S104) The motor control device 30 c performs motor control based on the angle measurement signal θ′ output by the offset correction device 40 c. After step S104 ends, the process proceeds to step S105.

(Step S105) The offset correction device 40 c measures the q-axis current command value Iq* corrected based on the angle measurement signal θ′, generates the offset error correction value Δθ′ which is a correction value by performing the proportional integral control on the deflection between 0 and the q-axis current command value Iq*, and outputs the angle measurement signal θ′ corrected to the detection signal θ to the motor control device 30 c.

Thereafter, the offset correction device 40 c and the motor control device 30 c automatically adjust the offset error correction value by repeatedly performing steps S104 and S105. Alternatively, for example, the offset correction device 40 c may fix the offset error correction value when a variation in the repeated calculated offset error correction value is less than a predetermined value, that is, when the repeated calculated offset error correction value converges, and then stops the PI control.

As described above, the motor control system 1 c according to the present embodiment performs the control so that the d-axis current flows in the field-weakening control region or a control region in which the velocity of the motor is not within the field-weakening control region, by rotating the motor 10 in the unloaded state. Then, when the motor 10 is rotated in the unloaded state in this way, the motor control system 1 c according to the present embodiment measures the q-axis current command value, generates the offset error correction value by performing the PI control based on the deflection between 0 and the measured q-axis current command value, and perform the motor control based on the generated offset error correction value. As a result, the offset error correction value can be automatically adjusted.

Also, in the present embodiment, the example in which the d-axis current is provided in the field-weakening control region has been described as in the first embodiment. However, as in the second embodiment, the control unit 411 may perform control such that the d-axis current is added in a voltage control region in which no d-axis current is generated. Even in this case, the offset correction device 40 c measures the q-axis current command, generates the offset error correction value by performing the PI control based on the deflection between 0 and the measured d-axis current command value, and performs the motor control based on the generated offset error correction value. As a result, the offset error correction value can be automatically adjusted. However, since the q-axis current command value is fed back, the d-axis current to be added is required to be negative.

Alternatively, after repeating the foregoing steps by velocity commands of positive rotation and negative rotation, for example, the offset correction device 40 c may calculate an average of offset error correction values calculated by the velocity commands of the positive rotation and the negative rotation and calculate the offset error correction value which is a correction value. Also, the offset error correction values generated in the first to third embodiments may be stored in a storage unit (not illustrated) of the motor control device 30 (30 a, 30 b, or 30 c) or the offset correction device 40 (40 a, 40 b, or 40 c).

Also, when the offset error is great, a control system in the motor control device becomes unstable. Thus, when the offset error is great, an assembly failure, a wiring fault, or the like of the resolver may occur. For this reason, in the first to third embodiments, it may be detected whether the offset error is greater than a predetermined value (for example, 30 degrees) by a known technology, and the motor and the resolver may be detected for removal in advance.

Also, in the first to third embodiments, the d-axis current Id and the q-axis current Iq may be used as the inputs of the offset correction device 40 (40 a, 40 b, or 40 c) rather than the d-axis current command value Id* and the q-axis current command value Iq*.

Also, in the present embodiment, the example in which the offset error is calculated by rotating the motor 10 in the unloaded state at the constant velocity and the motor control is performed by adding the calculated offset error correction value and the detection signal by the resolver has been described, but the present invention is not limited thereto. By rotating the motor 10 in a state of reverse constant load torque positively and negatively rather than the unloaded state, the motor control system 1 can cancel the angle α described with reference to FIGS. 8 and 10.

Also, to realize the functions of the units in FIGS. 1, 4, 14A to 14D, and 16 of the embodiment, the functions may be executed by a program stored also in a ROM, an HDD, or the like connected to a CPU of a computer system. Alternatively, the functions may be realized by hardware using a programmable logic device (PLD), an application specific integrated circuit (ASIC), or a circuit.

INDUSTRIAL APPLICABILITY

Since the present invention is applicable broadly to a motor control device and a motor control method, a current command value is measured when a constant current amount of d-axis current is allowed to flow and a motor is rotated at a constant velocity, a correction value by a rotation position of the motor is calculated based on the measured current command value, the rotation of the motor is controlled using the calculated correction value. Thus, even when the detected rotation position is deviated, the motor can be controlled with high precision.

DESCRIPTION OF THE REFERENCE SYMBOLS

-   -   1, 1 c Motor control device     -   10 Motor     -   20 Resolver     -   30, 30 a, 30 b, 30 c Motor control device     -   40, 40 a, 40 b, 40 c Offset correction device     -   60 Control target     -   70 Addition unit     -   301 Addition unit     -   302 Velocity calculation unit     -   303 Velocity PI control unit     -   304 Current command unit     -   305 Current detector     -   306 3-phase/2-phase conversion unit     -   307, 307 a, 307 b Current PI control unit     -   308 2-phase/3-phase conversion unit     -   309 Duty calculation unit     -   310 Power conversion unit     -   331 Addition unit     -   401, 411 Control unit     -   402, 402 a, 412 Current measurement unit     -   403, 403 a, 413 Offset calculation unit     -   414 Addition unit     -   600 First phase conversion unit     -   601 Second phase conversion unit     -   602 Motor voltage equation unit     -   603 Torque equation unit     -   604 (1/Js)     -   605 (1/s) 

1. A motor control device generating a voltage command value from a current command value and performing feedback control using a detection current flowing in a motor, the motor control device comprising: a velocity control unit configured to perform velocity control of the motor based on a velocity command value by which a constant current amount of d-axis current flows by rotating the motor at a constant velocity; a current measurement unit configured to measure the current command value based on an output of the velocity control unit when the motor is rotated at the constant velocity and the constant current amount of d-axis current flows; and a correction value calculation unit configured to calculate a correction value at a rotation position of the motor based on the measured current command value.
 2. The motor control device according to claim 1, wherein the correction value calculation unit generates a value indicating the rotation position by adding the calculated correction value and a detection value corresponding to the rotation position of the motor, and the velocity control unit controls the motor based on the generated value indicating the rotation position.
 3. The motor control device according to claim 1, wherein, when the current measurement unit measures the current command value, the velocity control unit performs the velocity control of the motor based on the velocity command value by which the constant current amount of d-axis current flows in the motor in a field-weakening control region.
 4. The motor control device according to claim 1, wherein, when the current measurement unit measures the current command value, the velocity control unit performs the velocity control of the motor based on a current command value obtained by adding the constant current amount of d-axis current and the current command value in a control region in which a velocity of the motor is not within a field-weakening region.
 5. The motor control device according to claim 1, wherein the current command value includes a d-axis current command value and a q-axis current command value, the current measurement unit measures the d-axis current command value and the q-axis current command value when the motor is rotated based on the velocity command value, and the correction value calculation unit calculates a first correction value as the correction value based on phases of the measured d-axis current command value and q-axis current command value when the motor is positively rotated.
 6. The motor control device according to claim 5, wherein the correction value calculation unit calculates, as the correction value, a second correction value calculated based on the phases of the measured d-axis current command value and q-axis current command value when the motor is negatively rotated.
 7. The motor control device according to claim 6, wherein the velocity control unit performs control such that an absolute value of the velocity command value in the positive rotation of the motor is the same as an absolute value of the velocity command value in the negative rotation of the motor, and the correction value calculation unit calculates the correction value by calculating an average of the calculated first and second correction values.
 8. The motor control device according to claim 5, wherein the correction value calculation unit calculates the correction value, the first correction value, and the second correction value using an equation below: $\begin{matrix} {{{CORRECTION}\mspace{14mu} {VALUE}} = {- {\tan^{- 1}\left( \frac{\begin{matrix} {q\text{-}{AXIS}\mspace{14mu} {CURRENT}} \\ {{COMMAND}\mspace{14mu} {VALUE}} \end{matrix}}{\begin{matrix} {d\text{-}{AXIS}\mspace{14mu} {CURRENT}} \\ {{COMMAND}\mspace{14mu} {VALUE}} \end{matrix}} \right)}}} & \left\lbrack {{Math}.\mspace{14mu} 1} \right\rbrack \end{matrix}$
 9. The motor control device according to claim 1, wherein the current measurement unit measures the q-axis current command value when the motor is rotated based on the velocity command value, and the correction value calculation unit repeatedly calculates the correction value by performing proportional integral control so that the measured q-axis current command value becomes 0 and performs addition to the detection value corresponding to the rotation position of the motor based on the calculated correction value.
 10. A motor control method of a motor control device generating a voltage command value from a current command value and performing feedback control using a detection current flowing in a motor, the motor control method comprising: a velocity control procedure of performing, by a velocity control unit, velocity control of the motor based on a velocity command value by which a constant current amount of d-axis current flows by rotating the motor at a constant velocity; a current measurement procedure of measuring, by a current measurement unit, the current command value based on an output of the velocity control unit when the motor is rotated at the constant velocity and the constant current amount of d-axis current flows; and a correction value calculation procedure of calculating, by a correction value calculation unit, a correction value at a rotation position of the motor based on the measured current command value.
 11. The motor control method according to claim 10, wherein, in the current measurement procedure, the q-axis current command value is measured when the motor is rotated based on the velocity command value, and in the correction value calculation procedure, the correction value is repeatedly calculated by performing proportional integral control so that the measured q-axis current command value becomes 0 and the detection value corresponding to the rotation position of the motor is added based on the calculated correction value. 